package com.jiukuaidao.library.widget.recyclerview.ref.impl;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.jiukuaidao.library.R;
import com.jiukuaidao.library.widget.recyclerview.ref.impl.header1.LoadingMoreFooter;

/**
 * @author BinarySatan
 */
public class RefreshFooter extends BaseRefreshFooter {
    ImageView mTv;
    LoadingMoreFooter footer;

    public RefreshFooter(final Context context) {
        super(context);

        mTv = (ImageView) findViewById(R.id.tv);
//        mTv.setText("上啦加载");
    }


    @Override
    public View getContainerView(LayoutInflater inflater) {
        footer = new LoadingMoreFooter(getContext());
        return footer;
    }

    @Override
    public void setState(int state) {
        footer.setState(state);
//        switch (state) {
//            case IRefreshFooter.STATE_LOADING:
//                footer.setState(STATE_LOADING);
////                mTv.setText("正在加载");
//                break;
//            case IRefreshFooter.STATE_COMPLETE:
//                footer.setState(STATE_COMPLETE);
////                mTv.setText("加载完成");
//                break;
//            case IRefreshFooter.STATE_NOMORE:
//                footer.setState(STATE_NOMORE);
////                mTv.setText("无更多数据");
//                break;
//            case IRefreshFooter.STATE_NORMAL:
//                footer.setState(STATE_NORMAL);
////                mTv.setText("上拉加载");
//                break;
//            case IRefreshFooter.STATE_RELEASE_LOAD:
//                footer.setState(STATE_RELEASE_LOAD);
////                mTv.setText("释放加载");
//                break;
//
//        }
        mState = state;
    }

}
